package com.cj.pj.sys.common.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
public class PageObject<T> {
    private Integer pageCurrent;
    private List<T> records;
    private Integer pageSize=5;
    private Integer rowCount;
    private Integer pageCount;

    public PageObject(Integer pageCurrent, List<T> records, Integer rowCount) {
        this.pageCurrent = pageCurrent;
        this.records = records;
        this.rowCount = rowCount;
        Integer pageCount=rowCount/this.pageSize;
        if(rowCount%this.pageSize!=0)pageCount++;
        this.pageCount=pageCount;
    }

}
